<?php
/**
 * Created by PhpStorm.
 * BuyUser: u
 * Date: 2018/11/8
 * Time: 14:06
 */
namespace common\sources\read\config;

use common\models\craftsman\Config;

class ConfigAccess implements IConfigAccess
{
    public function GetPayConfig() {
        $config = Config::find()
            ->select("company,qk_config_rmb,pageUrl,bgUrl,productName,payType,cert_path,pem_path,use")
            ->where(['use' => 1])
            ->asArray()
            ->one();
        return $config;
    }

    public function GetList() {
        $list = Config::find()
            ->select("id,company,qk_config_rmb,pageUrl,bgUrl,productName,payType,cert_path,pem_path,use")
            ->asArray()
            ->all();
        return $list;
    }
}